SymbolControl
METADATA
Attribute | Value |
---|---|
Topic | 1630-client-book-risk |
MLink Token | ClientControl |
Product | SRControl |
accessType | SELECT,UPDATE,INSERT,DELETE |
Table Definition
Field | Type | Key | Default Value | Comment |
---|---|---|---|---|
symCtrlAccnt | VARCHAR(16) | PRI | '' | |
clientFirm | VARCHAR(16) | PRI | '' | |
ticker_at | enum - AssetType | PRI | 'None' | |
ticker_ts | enum - TickerSrc | PRI | 'None' | |
ticker_tk | VARCHAR(12) | PRI | '' | |
sector | VARCHAR(16) | '' | ||
riskClass | VARCHAR(8) | 'A' | ||
stkStatus | enum - StkStatus | 'TwoWay' | ||
futStatus | enum - FutStatus | 'TwoWay' | ||
optStatus | enum - OptStatus | 'TwoWay' | ||
holdReason | enum - HoldReason | 'None' | ||
binaryDays | FLOAT | 0.5 | ||
hedgeDeltaRule | enum - HedgeDeltaRule | 'None' | HedgeDelta Source IVol use SR implied surface sticky strike IvS use SR surface dynamic TVol use user supplied theo surface sticky strike TvS use user supplied theo surface dynamic AccountConfighedgeDelta | |
modifiedBy | VARCHAR(24) | '' | user who last modified this record | |
modifiedIn | enum - SysEnvironment | 'None' | ||
timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | timestamp of last modification |
PRIMARY KEY DEFINITION (Unique)
Field | Sequence |
---|---|
symCtrlAccnt | 1 |
clientFirm | 2 |
ticker_tk | 3 |
ticker_at | 4 |
ticker_ts | 5 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRControl`.`MsgSymbolControl` (
`symCtrlAccnt` VARCHAR(16) NOT NULL DEFAULT '',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '',
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`sector` VARCHAR(16) NOT NULL DEFAULT '',
`riskClass` VARCHAR(8) NOT NULL DEFAULT 'A',
`stkStatus` ENUM('Hold','TwoWay','DayHold') NOT NULL DEFAULT 'TwoWay',
`futStatus` ENUM('Hold','TwoWay','DayHold') NOT NULL DEFAULT 'TwoWay',
`optStatus` ENUM('Hold','TwoWay','BuyOnly','SellOnly','CloseOnly','CloseNow','CloseRisk','BuyCloseOnly','SellCloseOnly') NOT NULL DEFAULT 'TwoWay',
`holdReason` ENUM('None','BadData','CorpAction','PendDeal','PendEvent','ExtTrade','LowPrice','PendEarn','DealRumour','BadDiv','Watch','NewSym','NoLoc','NegPerf','NegEdge') NOT NULL DEFAULT 'None',
`binaryDays` FLOAT NOT NULL DEFAULT 0.5,
`hedgeDeltaRule` ENUM('None','IVol','IvS','TVol','TvS','Binary','IvS_25','IvS_50','IvS_75','TvAll','TvAllS') NOT NULL DEFAULT 'None' COMMENT 'HedgeDelta Source (IVol = use SR implied surface (sticky strike), IvS = use SR surface (dynamic), TVol = use user supplied theo surface (sticky strike), TvS = use user supplied theo surface (dynamic)) [AccountConfig.hedgeDelta]',
`modifiedBy` VARCHAR(24) NOT NULL DEFAULT '' COMMENT 'user who last modified this record',
`modifiedIn` ENUM('None','Neptune','Pluto','V7_Stable','V7_Latest','Saturn','Venus','Mars','SysTest','V7_Current') NOT NULL DEFAULT 'None',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of last modification',
PRIMARY KEY USING HASH (`symCtrlAccnt`,`clientFirm`,`ticker_tk`,`ticker_at`,`ticker_ts`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';
SELECT TABLE EXAMPLE QUERY
SELECT
`symCtrlAccnt`,
`clientFirm`,
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`sector`,
`riskClass`,
`stkStatus`,
`futStatus`,
`optStatus`,
`holdReason`,
`binaryDays`,
`hedgeDeltaRule`,
`timestamp`
FROM `SRControl`.`MsgSymbolControl`
WHERE
/* Replace with a VARCHAR(16) */
`symCtrlAccnt` = 'Example_symCtrlAccnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm'
AND
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk';
UPDATE TABLE EXAMPLE QUERY
UPDATE `SRControl`.`MsgSymbolControl`
SET
/* Replace with a VARCHAR(16) */
`sector` = 'Example_sector',
/* Replace with a VARCHAR(8) */
`riskClass` = 'Example_riskClass',
/* Replace with a ENUM('Hold','TwoWay','DayHold') */
`stkStatus` = 'TwoWay',
/* Replace with a ENUM('Hold','TwoWay','DayHold') */
`futStatus` = 'TwoWay',
/* Replace with a ENUM('Hold','TwoWay','BuyOnly','SellOnly','CloseOnly','CloseNow','CloseRisk','BuyCloseOnly','SellCloseOnly') */
`optStatus` = 'TwoWay',
/* Replace with a ENUM('None','BadData','CorpAction','PendDeal','PendEvent','ExtTrade','LowPrice','PendEarn','DealRumour','BadDiv','Watch','NewSym','NoLoc','NegPerf','NegEdge') */
`holdReason` = 'None',
/* Replace with a FLOAT */
`binaryDays` = 1.23,
/* Replace with a ENUM('None','IVol','IvS','TVol','TvS','Binary','IvS_25','IvS_50','IvS_75','TvAll','TvAllS') */
`hedgeDeltaRule` = 'None',
/* Replace with a DATETIME(6) */
`timestamp` = '2022-01-01 12:34:56.000000'
WHERE
/* Replace with a VARCHAR(16) */
`symCtrlAccnt` = 'Example_symCtrlAccnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm'
AND
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk';
INSERT TABLE EXAMPLE QUERY
INSERT INTO `SRControl`.`MsgSymbolControl`(
/* Replace with a VARCHAR(16) */
`symCtrlAccnt`,
/* Replace with a VARCHAR(16) */
`clientFirm`,
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at`,
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts`,
/* Replace with a VARCHAR(12) */
`ticker_tk`,
/* Replace with a VARCHAR(16) */
`sector`,
/* Replace with a VARCHAR(8) */
`riskClass`,
/* Replace with a ENUM('Hold','TwoWay','DayHold') */
`stkStatus`,
/* Replace with a ENUM('Hold','TwoWay','DayHold') */
`futStatus`,
/* Replace with a ENUM('Hold','TwoWay','BuyOnly','SellOnly','CloseOnly','CloseNow','CloseRisk','BuyCloseOnly','SellCloseOnly') */
`optStatus`,
/* Replace with a ENUM('None','BadData','CorpAction','PendDeal','PendEvent','ExtTrade','LowPrice','PendEarn','DealRumour','BadDiv','Watch','NewSym','NoLoc','NegPerf','NegEdge') */
`holdReason`,
/* Replace with a FLOAT */
`binaryDays`,
/* Replace with a ENUM('None','IVol','IvS','TVol','TvS','Binary','IvS_25','IvS_50','IvS_75','TvAll','TvAllS') */
`hedgeDeltaRule`,
/* Replace with a DATETIME(6) */
`timestamp`
)
VALUES(
'Example_symCtrlAccnt',
'Example_clientFirm',
'None',
'None',
'Example_ticker_tk',
'Example_sector',
'Example_riskClass',
'TwoWay',
'TwoWay',
'TwoWay',
'None',
1.23,
'None',
'2022-01-01 12:34:56.000000'
);
DELETE TABLE EXAMPLE QUERY
DELETE FROM `SRControl`.`MsgSymbolControl`
WHERE
/* Replace with a VARCHAR(16) */
`symCtrlAccnt` = 'Example_symCtrlAccnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm'
AND
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk';
Doc Columns Query
SELECT * FROM SRControl.doccolumns WHERE TABLE_NAME='SymbolControl' ORDER BY ordinal_position ASC;